<!DOCTYPE html>

<html ng-app="demoApp">
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width,initial-scale=1">
		<meta name="description" content="A fully featured admin theme which can be used to build CRM, CMS, etc.">
		<meta name="author" content="Coderthemes">

		<link rel="shortcut icon" href="assets/images/favicon_1.ico">

	 <title>圣斯尔物联网监测平台</title>

		<!-- notify -->
		<link href="assets/plugins/notifications/notification.css" rel="stylesheet">
		<![endif]-->


		<!-- DataTables -->
		<link href="assets/plugins/datatables/jquery.dataTables.min.css" rel="stylesheet" type="text/css" />
		<link href="assets/plugins/datatables/buttons.bootstrap.min.css" rel="stylesheet" type="text/css" />
		<link href="assets/plugins/datatables/fixedHeader.bootstrap.min.css" rel="stylesheet" type="text/css" />
		<link href="assets/plugins/datatables/responsive.bootstrap.min.css" rel="stylesheet" type="text/css" />
		<link href="assets/plugins/datatables/scroller.bootstrap.min.css" rel="stylesheet" type="text/css" />
		<link href="assets/plugins/bootstrap-datepicker/css/bootstrap-datepicker.min.css" rel="stylesheet">

		<!--Morris Chart CSS -->
		<link rel="stylesheet" href="assets/plugins/morris.js/morris.css">


		<link href="assets/plugins/sweetalert/sweetalert.css" rel="stylesheet" type="text/css">

		<link href="assets/css/bootstrap.min.css" rel="stylesheet" type="text/css">
		<link href="assets/css/core.css" rel="stylesheet" type="text/css">
		<link href="assets/css/icons.css" rel="stylesheet" type="text/css">
		<link href="assets/css/components.css" rel="stylesheet" type="text/css">
		<link href="assets/css/pages.css" rel="stylesheet" type="text/css">
		<link href="assets/css/menu.css" rel="stylesheet" type="text/css">
		<link href="assets/css/responsive.css" rel="stylesheet" type="text/css">
		
		<link href="assets/css/easyui.css" rel="stylesheet" type="text/css">
		<link href="assets/css/select.css" rel="stylesheet" type="text/css">
		

	</head>
	<body class="fixed-left" ng-controller="indexCtrl" >

	<!-- Begin page -->
	<div id="wrapper" style="display: none">

		<!-- Top Bar Start -->

		<!--<div ng-include="'top.html'"></div>-->
		<div class="topbar">
			<!-- LOGO -->
			<div class="topbar-left">
				<div class="text-center">
					<a href="/" class="logo">
					<!-- <i class="md md-terrain"></i>  -->
					<span>圣斯尔物联网监测平台 </span></a>
				</div>
			</div>
			<!-- Button mobile view to collapse sidebar menu -->
			<div class="navbar navbar-default" role="navigation">
				<div class="container">
					<div class="">
						<div class="pull-left">
							<button class="button-menu-mobile open-left">
								<i class="fa fa-bars"></i>
							</button>
							<span class="clearfix"></span>
						</div>
					<!--	<form class="navbar-form pull-left" role="search">
							<div class="form-group">
								<input type="text" class="form-control search-bar" placeholder="Type here for search...">
							</div>
							<button type="submit" class="btn btn-search"><i class="fa fa-search"></i></button>
						</form>-->

						<ul class="nav navbar-nav navbar-right pull-right">
							<li class="dropdown hidden-xs">
								<a   data-target="#" class="dropdown-toggle waves-effect" data-toggle="dropdown" aria-expanded="true">
									<i class="md md-notifications"></i> <span class="badge badge-xs badge-danger" ng-bind="$root.faultCount"></span>
								</a>
								<ul class="dropdown-menu dropdown-menu-lg">
									<li class="text-center notifi-title">通知</li>
									<li class="list-group">
										<!-- list item-->
										<a href="javascript:void(0);" class="list-group-item">
											<div class="media">
												<div class="pull-left">
													<em class="fa fa-bell-o fa-2x text-danger"></em>
												</div>
												<div class="media-body clearfix"  style="display: table-cell;">
													<div class="media-heading">设备报警</div>
													<p class="m-0"  ng-repeat="entity in $root.faultAlarmList" ng-if="$root.faultAlarmList && $root.faultAlarmList.length >0" ng-click="gotoWarningLog(entity)" >
														<small>
															<span class="text-primary" >{{entity.name}}的{{entity.attr_name}}发生报警</span>
														</small>
													</p>
													<p class="m-0"   ng-if="!$root.faultAlarmList || $root.faultAlarmList.length <=0" >
														<small>
															暂无故障问题
														</small>
													</p>
												</div>
											</div>
										</a>
										<!-- last list item -->

									</li>
								</ul>
							</li>
							<li class="dropdown">
                                    <!--<a href="" class="dropdown-toggle profile" data-toggle="dropdown" aria-expanded="true">
									<img src="assets/images/users/avatar-1.jpg" alt="user-img" class="img-circle"> </a>-->
									<a href="" class="waves-effect waves-light"  data-toggle="dropdown">
									
									<span >{{user.company}} <i class="ion-chevron-down fa-lg" style = "font-size: 16px;"></i></span>
									
									</a>
                                    <ul class="dropdown-menu">
                                        <li><a href="javascript:void(0)" data-toggle="modal" data-target="#user-info-modal"><i class="md md-face-unlock"></i> 个人信息</a></li>
                                        <li><a href="javascript:void(0)"  data-toggle="modal" data-target="#update-pwd-modal"><i class="md md-settings"></i> 修改密码</a></li>
                                        <li><a ng-click="logout()"><i class="md md-settings-power"></i> 退出登录</a></li>
                                    </ul>
                                </li>
						</ul>
					</div>
					<!--/.nav-collapse -->
				</div>
			</div>
		</div>
		<!-- Top Bar End -->

		<!-- ========== Left Sidebar Start ========== -->

		<div class="left side-menu">
                <div class="sidebar-inner slimscrollleft">
                    
                    <!--- Divider -->
                    <div id="sidebar-menu">
                        <ul>
                            <li>
                                <a href="#/module/home" class="waves-effect waves-light "><i class="md md-home"></i><span> 首页 </span></a>
                            </li>
                            

                            
							 <li class="has_sub">
                                <a href="#" class="waves-effect waves-light"><i class="md md-poll"></i><span>监控中心</span><span class="pull-right"><i class="md md-add"></i></span></a>
                                <ul class="list-unstyled">
                                
                                	<li>
                                        <a href="#/module/equMap"><span>地图展示</span></a>
                                    </li>
                                    
                                    <li>
                                        <a href="#/module/devList"><span>列表展示</span></a>
                                    </li>
                                </ul>
                            </li> 
							 
							<li class="has_sub">
                                <a href="javascript:void(0);" class="waves-effect waves-light"><i class="md ion-android-storage"></i><span>数据管理</span><span class="pull-right"><i class="md md-add"></i></span></a>
                                <ul>
                                    
                                    <li>
                                        <a href="#/module/modelList"><span>数据模板</span></a>
                                    </li>
                                    <li>
                                        <a href="#/module/logShow/"><span>历史数据</span></a>
                                    </li>

									
                                </ul>
                            </li>
                            <li class="has_sub">
                                <a href="javascript:void(0);" class="waves-effect waves-light"><i class="md ion-earth"></i><span>设备管理</span><span class="pull-right"><i class="md md-add"></i></span></a>
                                <ul>
                                    
                                    <li>
                                        <a href="#/module/equView"><span>设备列表</span></a>
                                    </li>
									<li>
                                        <a href="#/module/equGroups"><span>设备分组</span></a>
                                    </li>
									
                                </ul>
                            </li>
                            <li class="has_sub">
                                <a href="#" class="waves-effect waves-light"><i class="md md-poll"></i><span>报警管理</span><span class="pull-right"><i class="md md-add"></i></span></a>
                                <ul class="list-unstyled">
                                
                                	<li>
                                        <a href="#/module/alarmSetting"><span>报警设置</span></a>
                                    </li>
                                    
                                    <li>
                                        <a href="#/module/alarmLogList"><span>报警记录</span></a>
                                    </li>
                                </ul>
                            </li> 
							<li class="has_sub" ng-show="user.competence != 4">
                                <a href="javascript:void(0);" class="waves-effect waves-light"><i class="ion-ios7-gear"></i><span>系统管理 </span><span class="pull-right"><i class="md md-add"></i></span></a>
                                <ul>
                                    
                                    <li ng-if="user.competence != 4">
                                        <a href="#/module/userList"><span>用户管理</span></a>
                                    </li>
									<li  ng-if="user.competence != 4">
										<a ng-click="clearData()" style=" cursor: pointer;"><span>清空数据</span></a>
									</li>
                                </ul>
                            </li>
                        </ul>
                        <div class="clearfix"></div>
                    </div>
                    <div class="clearfix"></div>
                </div>
            </div>
		<!-- Left Sidebar End -->

		<!-- 中间正文 -->
		<!--<div class="container">
			<div class="content-page" ng-view></div>
		</div>-->

		<div class="content-page" >
			<div class="content" ng-view></div>
			<footer class="footer text-right">
				2018 © SSED.
			</footer>
		</div>
		<iframe name="downLoadFileFrame" hidden="hidden"></iframe>
<script type="text/javascript" src="https://api.map.baidu.com/api?v=3.0&amp;ak=D7799b0b6aee5644fd082a5d487dbd59"></script>

<!--
<script type="text/javascript" src="https://api.map.baidu.com/api?v=3.0&amp;ak=TmYyujvLywBDOj91omCGrbmS0YQ6oswu"></script>

<script type="text/javascript" src="https://api.map.baidu.com/api?v=3.0&amp;ak=0UeqWhqYsjiNbWkLdaPdvSqc"></script>
<script type="text/javascript" src="https://api.map.baidu.com/getscript?v=3.0&amp;ak=0UeqWhqYsjiNbWkLdaPdvSqc&amp;services=&amp;t=20181204121730"></script>
-->

<script type="text/javascript" src="https://api.map.baidu.com/library/TextIconOverlay/1.2/src/TextIconOverlay_min.js"></script>
<script type="text/javascript" src="https://api.map.baidu.com/library/MarkerClusterer/1.2/src/MarkerClusterer_min.js"></script>

		<!-- angular -->
		<script type="text/javascript" src="static/js/angular-1.5.8.min.js"></script>
		<script type="text/javascript" src="static/js/angular-route.min.js"></script>
		<script type="text/javascript" src="app/app.js"></script>
		<script type="text/javascript" src="app/service/httpInterceptor.js"></script>
		<script type="text/javascript" src="app/directive/pageDirectives.js"></script>
		<script type="text/javascript" src="app/directive/tmPageDirectives.js"></script>
		<script type="text/javascript" src="app/directive/btnLoadDirectives.js"></script>
		<script type="text/javascript" src="app/directive/groupsDirective.js"></script>
		<script type="text/javascript" src="app/directive/fileModelDirectives.js"></script>

		
		<!-- html -->

		<script>
			var resizefunc = [];
		</script>
		<script src="assets/js/modernizr.min.js"></script>
		<!-- jQuery  -->
		<script src="assets/js/jquery.min.js"></script>
		<script src="assets/js/bootstrap.min.js"></script>
		<script src="assets/js/detect.js"></script>
		<script src="assets/js/fastclick.js"></script>
		<script src="assets/js/jquery.slimscroll.js"></script>
		<script src="assets/js/jquery.blockUI.js"></script>
		<script src="assets/js/waves.js"></script>
		<script src="assets/js/wow.min.js"></script>
		<script src="assets/js/jquery.nicescroll.js"></script>
		<script src="assets/js/jquery.scrollTo.min.js"></script>

		<script src="assets/js/jquery.app.js"></script>
		<script src="assets/js/select.js"></script>

		<!-- moment js  -->
		<script src="assets/plugins/moment/moment.js"></script>

		<!-- counters  -->
		<script src="assets/plugins/waypoints/lib/jquery.waypoints.js"></script>
		<script src="assets/plugins/counterup/jquery.counterup.min.js"></script>


		<!-- sweet alert  -->
		<script src="assets/plugins/sweetalert/sweetalert.min.js"></script>


		<!-- Datatables-->
		<script src="assets/plugins/datatables/jquery.dataTables.min.js"></script>
		<script src="assets/plugins/datatables/dataTables.bootstrap.js"></script>
		<script src="assets/plugins/datatables/dataTables.buttons.min.js"></script>
		<script src="assets/plugins/datatables/buttons.bootstrap.min.js"></script>
		<script src="assets/plugins/datatables/jszip.min.js"></script>
		<script src="assets/plugins/datatables/pdfmake.min.js"></script>
		<script src="assets/plugins/datatables/vfs_fonts.js"></script>
		<script src="assets/plugins/datatables/buttons.html5.min.js"></script>
		<script src="assets/plugins/datatables/buttons.print.min.js"></script>
		<script src="assets/plugins/datatables/dataTables.fixedHeader.min.js"></script>
		<script src="assets/plugins/datatables/dataTables.keyTable.min.js"></script>
		<script src="assets/plugins/datatables/dataTables.responsive.min.js"></script>
		<script src="assets/plugins/datatables/responsive.bootstrap.min.js"></script>
		<script src="assets/plugins/datatables/dataTables.scroller.min.js"></script>
		<script type="text/javascript" src="assets/plugins/bootstrap-datepicker/js/bootstrap-datepicker.js"></script>


		<!-- Nestable -->
		<script src="assets/plugins/nestable/jquery.nestable.js"></script>
		

		
	
		<!-- flot Chart -->
		<script src="assets/plugins/flot-chart/jquery.flot.js"></script>
		<script src="assets/plugins/flot-chart/jquery.flot.time.js"></script>
		<script src="assets/plugins/flot-chart/jquery.flot.tooltip.min.js"></script>
		<script src="assets/plugins/flot-chart/jquery.flot.resize.js"></script>
		<script src="assets/plugins/flot-chart/jquery.flot.pie.js"></script>
		<script src="assets/plugins/flot-chart/jquery.flot.selection.js"></script>
		<script src="assets/plugins/flot-chart/jquery.flot.stack.js"></script>
		<script src="assets/plugins/flot-chart/jquery.flot.crosshair.js"></script>

		<!-- notify -->
		<script src="assets/plugins/notifications/notify.min.js"></script>
		<script src="assets/plugins/notifications/notify-metro.js"></script>
		<script src="assets/plugins/notifications/notifications.js"></script>



		<!-- md5 -->
		<script src="assets/js/md5.js"></script>
		
		<!-- angular control js -->
		<script src="app/controller/userControllers.js"></script>
		<script src="app/controller/homeController.js"></script>
		<script src="app/controller/equipmentControllers.js"></script>
		<script src="app/controller/lightLogControllers.js"></script>
		<script src="app/controller/nbLightLogControllers.js"></script>
		<script src="app/controller/warningLogControllers.js"></script>
		<script src="app/controller/liteEquControllers.js"></script>
		<script src="app/controller/liteAppControllers.js"></script>
		<script src="app/controller/liteLogControllers.js"></script>
		<script src="app/controller/devChartController.js"></script>
		<script src="app/controller/devPageController.js"></script>
		<script src="app/controller/equGroupsController.js"></script>
		<script src="app/controller/equAddController.js"></script>
		<script src="app/controller/equEditController.js"></script>
		<script src="app/controller/equMapController.js"></script>
		<script src="app/controller/modelEditController.js"></script>
		<script src="app/controller/modelListController.js"></script>
		<script src="app/controller/logShowController.js"></script>
		<script src="app/controller/devMapController.js"></script>
		<script src="app/controller/devListController.js"></script>
		<script src="app/controller/alarmSettingControllers.js"></script>
		<script src="app/controller/alarmlogListController.js"></script>
		<script src="app/controller/queryDataLogController.js"></script>
		<script type="text/javascript">
			jQuery(document).ready(function($) {
				$('.counter').counterUp({
					delay: 100,
					time: 1200
				});
			});
		</script>

		<script type="text/javascript">

			var defaultSize=15;
			demoApp.controller("indexCtrl", function($scope, $http, $rootScope, $timeout,$interval,$location) {

				//报警
				$rootScope.faultCount=0;
				$rootScope.faultAlarmList=new Array();
				$scope.newPwd ="";
				$scope.checkPwd ="";
				$scope.encordSrcPwd="";
				$scope.encordNewPwd="";
				$scope.srcPwd="";
				$http.post("service/checkLogin").success(function(data) {
					if(data.resultObj){
						//保存全局的用户
						$rootScope.user=data.resultObj;
						//全局编辑权限
						$rootScope.edit_cmp=data.resultObj.cmp;
						$scope.ajxUserInfo($rootScope.user);
						var homeDiv=document.getElementById("wrapper");
						homeDiv.style.display='block';
					}else{
						//未登录则跳回登录页
						window.location.href="/login.html";
					}
				});
				//查询报警数
				$scope.queryFaultCount=function(isFirst ){

					$http.post("service/queryAlarm",{"queryChange":isFirst}).success(function(data) {
						if(data.success){

							$rootScope.faultCount =data.resultObj.alarmCount;
							$rootScope.faultAlarmList =data.resultObj.alarmList;
							if(data.resultObj.chaneList){
								for(var i=0;i<data.resultObj.chaneList.length;i++){
									var mes =data.resultObj.chaneList[i];
									var value="";

									if("A"==mes.data_status){
										if(mes.data_type != 'ALARM_TYPE' && mes.data_type != 'SWITCH_TYPE'){
											value =mes.data_value;
											if(mes.unit){
												value=value+mes.unit;
											}
										}else if(mes.data_type == 'SWITCH_TYPE'){
											if(mes.data_value == '0000'){
												value="开";
											}else if(mes.data_value == '0001'){
												value="关";
											}else  if(mes.data_value == 'ERR'){
												value="异常数据";
											}
										}else if(mes.data_type == 'ALARM_TYPE'){
											if(mes.data_value == '0000'){
												value="正常";
											}else if(mes.data_value == '0001'){
												value="报警";
											}else  if(mes.data_value == 'ERR'){
												value="异常数据";
											}
										}
										$.Notification.notify('warning', 'top right', '设备数据点故障', mes.name+"的"+mes.attr_name+"报警,当前值为："+value);

									}else if("N" == mes.data_status){

										if(mes.data_type != 'ALARM_TYPE' && mes.data_type != 'SWITCH_TYPE'){
											value =mes.new_value;
											if(mes.unit){
												value=value+mes.unit;
											}
										}else if(mes.data_type == 'SWITCH_TYPE'){
											if(mes.new_value == '0000'){
												value="开";
											}else if(mes.new_value == '0001'){
												value="关";
											}else  if(mes.new_value == 'ERR'){
												value="异常数据";
											}
										}else if(mes.data_type == 'ALARM_TYPE'){
											if(mes.new_value == '0000'){
												value="正常";
											}else if(mes.new_value == '0001'){
												value="报警";
											}else  if(mes.new_value == 'ERR'){
												value="异常数据";
											}
										}
										$.Notification.notify('info', 'top right', '设备数据点恢复', mes.name+"的"+mes.attr_name+"恢复正常,当前值为："+value);
									}



								}
							}


						}
					});
				}

				$scope.queryFaultCount("FALSE");
				//每30s刷新一次
				$interval(function() {
					$scope.queryFaultCount("TRUE");
				}, 30*1000);

                $scope.gotoWarningLog =function (entity) {
                    $location.path("/module/alarmLogList/"+entity.dev_id+"/"+entity.attr_id+"/A");
                }

				$scope.logout=function(){
					$http.get("service/logout").success(function(data) {
						window.location.href="/login.html"
					});
				}

				$scope.updatePwd=function(){
					if($scope.newPwd != $scope.checkPwd){
						$scope.newPwd ="";
						$scope.checkPwd ="";
						swal("两次密码不一致，请重新输入！","error");
					}else{
						$scope.encordSrcPwd=hex_md5($scope.srcPwd);
						$scope.encordNewPwd=hex_md5($scope.newPwd);
						$http.post("service/updatePwd",
								{srcPwd:$scope.encordSrcPwd,
								newPwd :$scope.encordNewPwd}).success(function(data) {
									if(data.resultObj == "errorMsg"){
							        	swal(data.message, null, "error");
							        }else{
										swal({
								            title: "修改密码成功，请重新登录",
								            text: "即将跳转登陆页...",
								            timer: 3000,
								            showConfirmButton: false
								        });
										$timeout(function(){$scope.logout();}, 2900);
							        }
						});

					}
				}

				$scope.closePwd=function(){
					$scope.srcPwd="";
					$scope.newPwd ="";
					$scope.checkPwd ="";
					$scope.encordSrcPwd="";
					$scope.encordNewPwd="";
					$("#updatePwdId").click();
				}

				$scope.ajxUserInfo = function(user){
					$scope.currCompany=user.company;
					$scope.currContact=user.contact;
					$scope.currPhone=user.phone;
					$scope.currFax=user.fax;
					$scope.currEmail=user.email;
					$scope.currSite=user.site;
					$scope.currRemark=user.remark;
					$scope.currCompetence=user.competence+"";
					$scope.userEditable = true;
				}

				$scope.chgUserEdit = function(){
					$scope.userEditable = !$scope.userEditable;
				}

				$scope.closeUserInfoModal = function(){
					$scope.ajxUserInfo($rootScope.user);
					$("#close-user-info-modal").click();
				}

				$scope.userUpdate = function() {
			        $http.post("service/updateUserInfo",
			        		{company:$scope.currCompany,
			    			contact:$scope.currContact,
			    			phone:$scope.currPhone,
			    			fax:$scope.currFax,
			    			email:$scope.currEmail,
			    			site:$scope.currSite,
			    			remark:$scope.currRemark
			    			}).success(function(data) {
						    	if(data.resultObj == "errorMsg"){
						    		$scope.closeUserInfoModal();
						    		swal(data.message, null, "error");
						        }else{
						        	//修改成功后
						        	swal("修改成功", null, "success");
						        	$http.post("service/checkLogin").success(function(data) {
										if(data.resultObj){
											//保存全局的用户
											$rootScope.user=data.resultObj;
											$scope.closeUserInfoModal();
										}else{
											//未登录则跳回登录页
											window.location.href="/login.html";
										}

									});
						        }
			        });

			    }

				$scope.closeclearData=function(){
					$("#clearDataId").click();
				}

				$scope.clearData = function(){
					swal({   
			            title: "是否清空本账号所有设备的历史数据和报警记录？",
			           /* text: "该操作将清空NBIOT设备的所有上报数据记录，且无法恢复！\r\n请谨慎操作！",*/
			            type: "warning",   
			            showCancelButton: true,
						confirmButtonColor: "#aaa",
						cancelButtonColor: "#aaa",
			            confirmButtonText: "确定清空",
			            cancelButtonText: "取消",
			            closeOnConfirm: false,
			            closeOnCancel: false 
			        }, function(isConfirm){
			        	console.info(isConfirm);
			            if (isConfirm) {
			            	$scope.delLiteAll();
			            }  else {
			                swal("操作取消", null, "error");
			            } 
			        });
					
				}
				
				$scope.delLiteAll = function(){
					$http.post("service/deleteAllDataLog").success(function(data) {
							if(data.success){
								swal("删除成功", null, "success");
							}else{
								swal("删除失败", null, "success");
							}
						});
				}


				//下载文件
				$rootScope.downLoadFile = function (url, data) {

					if (!url) throw new Error('没有提供下载URL');

					var f = document.getElementsByName("downLoadFileFrame")[0];
					f.src = url;

					//postToIframe(url, data, 'downLoadFileFrame');

					return false;
				};

				function postToIframe(path, params, target, method) {
					var method = "post"; // Set method to post by default if not specified.

					// The rest of this code assumes you are not using a library.
					// It can be made less wordy if you use one.
					var form = document.getElementById('hiddenPostForm');
					if (!form) {
						// create hidden form
						$('body').append('<form name="hiddenPostForm" id="hiddenPostForm" class="hidden" ' +
								'method="' + method + '" action="' + path + '" ' +
								'accept-charset="UTF-8" enctype="application/x-www-form-urlencoded">' +
								'<input name="hiddenPostData" id="hiddenPostData" type="hidden" />' +
								'</form>'
						);
						form = document.getElementById('hiddenPostForm');
					}

					form.setAttribute("action", path);
					if (target) form.setAttribute("target", target);
					if (method) form.setAttribute("method", method);

					var hiddenField = document.getElementById('hiddenPostData');
					hiddenField.setAttribute("value", angular.isString(params) ? params : $.param(params));

					form.submit();
				}

			});
		</script>


		<div id="update-pwd-modal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="pwdModalLabel" aria-hidden="true" style="display: none">
			<div class="modal-dialog">
				<div class="modal-content">
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal" aria-hidden="true" ng-click="closePwd()">×</button>
						<h4 class="modal-title">个人密码修改</h4>
					</div>
					<form class="modal-body" ng-submit="updatePwd()"   name="updatePwdForm" >
						<div class="row">
							<div class="col-md-12">
								<div class="form-group">
									<label  class="control-label">原密码<span style="color: red">*</span></label>
									<input type="password" class="form-control" required ng-model="srcPwd" name="srcPwd">
								</div>
							</div>
							<div class="col-md-12">
								<div class="form-group">
									<label  class="control-label">新密码<span style="color: red">*</span></label>
									<input type="password" class="form-control" ng-minlength="6" ng-maxlength="16" required placeholder="必须由大于6位小于16位数字或字母组成" ng-model="newPwd" name="newPwd">
								</div>
							</div>
							<div class="col-md-12">
								<div class="form-group">
									<label  class="control-label">确认密码<span style="color: red">*</span></label>
									<input type="password" class="form-control" ng-minlength="6" ng-maxlength="16" required ng-model="checkPwd" placeholder="两次输入密码必须一致" name="checkPwd">
								</div>
								<div style="color: red" ng-show="updatePwdForm.newPwd.$invalid && updatePwdForm.newPwd.$dirty">
                      		  		*密码最小长度为6，最大长度为16
                   				</div>
								<div style="color: red" ng-show="newPwd != checkPwd && newPwd && checkPwd">
                      		  		*两次密码输入不一致
                   				</div>
							</div>
						</div>
						<div class="modal-footer">
							<button id="updatePwdId" type="button" class="btn btn-default waves-effect" data-dismiss="modal" ng-click="closePwd()">关闭</button>
							<button type="submit" class="btn btn-info waves-effect waves-light"  ng-disabled="updatePwdForm.$invalid || newPwd != checkPwd">保存</button>
						</div>
					</form>
				</div>
			</div>
		</div>
		<div id="user-info-modal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="userInfoModal" aria-hidden="true" style="display: none">
         <div class="modal-dialog"> 
             <div class="modal-content"> 
                 <div class="modal-header"> 
                     <button type="button" class="close" data-dismiss="modal" aria-hidden="true" ng-click="ajxUserInfo(user)" >×</button> 
                     <h4 class="modal-title">用户信息</h4> 
                 </div> 
                 <form class="modal-body" ng-submit="userUpdate()" name="userUpdateForm" novalidate="novalidate"> 
                     <div class="row"> 
                         <div class="col-md-8"> 
                             <div class="form-group"> 
                                 <label  class="control-label">公司名称<span style="color : red">*</span></label> 
                                 <input type="text" class="form-control" ng-disabled="userEditable"  name="currCompany" ng-model="currCompany" required > 
                             </div> 
                         </div> 
                         <div class="col-md-4"> 
                             <div class="form-group"> 
                                 <label  class="control-label">联系人<span style="color : red">*</span></label> 
                                 <input type="text" class="form-control" ng-disabled="userEditable" name="currContact" ng-model="currContact" required > 
                             </div> 
                         </div> 
                     </div> 
                     <div class="row"> 
                         <div class="col-md-4"> 
                             <div class="form-group"> 
                                 <label  class="control-label">联系电话<span style="color : red">*</span></label> 
                                 <input type="text" class="form-control" ng-disabled="userEditable" name="currPhone" ng-model="currPhone" required > 
                             </div> 
                         </div> 
                         
                         <div class="col-md-4"> 
                             <div class="form-group"> 
                                 <label  class="control-label">权限</label> 
                                 <select class="form-control" ng-disabled="true" name="currCompetence" ng-model="currCompetence" >
									<option  value="2">管理员</option>
									<option  value="3">客户</option>
									<option  value="4">普通用户</option>
								</select>
                             </div> 
                         </div> 
                          <div class="col-md-4"> 
                             <div class="form-group"> 
                                 <label  class="control-label">站点</label> 
                                 <input type="text" class="form-control" ng-disabled="userEditable" name="currSite" ng-model="currSite"  > 
                             </div> 
                         </div> 
                     </div> 
                     <div class="row"> 
                         <div class="col-md-8"> 
                             <div class="form-group"> 
                                 <label  class="control-label">邮箱</label> 
                                 <input type="email" class="form-control" ng-disabled="userEditable" name="currEmail" ng-model="currEmail"  > 
                                 <div style="color: red" ng-show="addUserForm.email.$invalid">
                      		  		*邮箱格式不正确
                   				</div>
                             </div> 
                         </div> 
                        <div class="col-md-4"> 
                             <div class="form-group"> 
                                 <label  class="control-label">传真</label> 
                                 <input type="text" class="form-control" ng-disabled="userEditable" name="currFax" ng-model="currFax"  > 
                             </div> 
                         </div> 
                     </div> 
                      <div class="row"> 
	                        <div class="col-md-12"> 
	                            <div class="form-group no-margin"> 
	                                 <label  class="control-label">备注</label>  
	                                <textarea  class="form-control autogrow" ng-disabled="userEditable" name="currRemark" ng-model="currRemark" style="overflow: hidden; word-wrap: break-word; resize: horizontal; height: 75px"></textarea> 
	                            </div>
	                            <div style="color: red" ng-show="!userEditable && !userUpdateForm.$dirty">
                      		  		*未修改任何信息
                   				</div> 
	                        </div> 
	                    </div>     
                 <div class="modal-footer"> 
                     <button id="close-user-info-modal" type="button" class="btn btn-default waves-effect" data-dismiss="modal" ng-click="ajxUserInfo(user)" >关闭</button> 
                     <button type="button" class="btn btn-info waves-effect waves-light" ng-show="userEditable" ng-click="chgUserEdit()" >编辑</button> 
                     <button type="submit" class="btn btn-info waves-effect waves-light" ng-show="!userEditable" ng-disabled="userUpdateForm.$invalid || !userUpdateForm.$dirty">保存</button> 
                 </div> 
                 </form> 
             </div> 
         </div>
     </div>
<!--

		<div id="clear_data-modal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="clearModalLabel" aria-hidden="true" style="display: none">
			<div class="modal-dialog">
				<div class="modal-content">
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal" aria-hidden="true" ng-click="closePwd()">×</button>
						<h4 class="modal-title">清除数据</h4>
					</div>
					<form class="modal-body" ng-submit="clearData()"   name="clearDataForm" >
						<div class="row">
							<div class="col-md-12">
								<div class="form-group">
									<label  class="control-label">数据类型<span style="color: red">*</span></label>
									&lt;!&ndash;<input type="password" class="form-control" required ng-model="dataType" name="dataType">&ndash;&gt;
								</div>
							</div>

						</div>
						<div class="modal-footer">
							<button id="clearDataId" type="button" class="btn btn-default waves-effect" data-dismiss="modal" ng-click="closeclearData()">关闭</button>
							<button type="submit" class="btn btn-info waves-effect waves-light"  ng-disabled="clearDataForm.$invalid">确定</button>
						</div>
					</form>
				</div>
			</div>
		</div>
-->

		</div>
	</body>
</html>